function [s_hat,signal] = max_rate_detect(h,r,rho,nt,nr,g)

r=r*sqrt(nt/rho);

result=g*r;

signal=[];
s_hat=[];
for m=1:length(r)
	s_hat(m)=bin2qpsk(qpsk2bin(result(m)));
	signal=horzcat(signal,qpsk2bin(s_hat(m)));
end

